var React = require('react');

//
// <ModalDialog dialogTitle="对话框标题">
//   ...
// </ModalDialog>
//

module.exports = function ModalDialog(props) {
  return (
    <div className="modal-dialog">
      <div className="modal-content">
        <div className="modal-header">
          {(typeof props.dialogTitle === 'string' && props.dialogTitle !== '') && (
            <h5 className="modal-title">
              {props.dialogTitle}
            </h5>
          )}

          <button type="button" className="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>

        {props.children}
      </div>
    </div>
  );
};
